﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MessageBox_Form
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            // change button text;
            Button b1 = (Button)sender;
            b1.Text = "clicked";

            ////show Non-modal dialog, you can move the base window
            //Form f1 = new Form();
            //f1.Show();

            // show modal dialog, you cannot move base window
            Form f2 = new Form();
            f2.ShowDialog();

            //// show message Box
            //MessageBox.Show("Hello World");

      
        }
    }
}
